export function arrayToBar(list, config = {}) {
    let { key, name, type } = config
    let serie = {
        name,
        data: [],
        type
    }

    list.forEach(obj => {
        serie.data.push(obj[key])
    })

    return serie
}